% Thesis template by Bevan Weir
% Modified by Lene Sælen
% original at http://www.rhizobia.co.nz/latex/thesis.html

%%%%%%%%%%%%%%%%%%%%%%%% start %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[a4paper,12pt,twoside] {book} % title page, draft - warning draft turns off hyperref

\usepackage{textcomp} % Allows the use of extra characters
\usepackage{verbatim, amsmath, amsfonts, amssymb, amsthm} % For code environment and math support
\usepackage[british]{babel} % For british english hyphenation patterns
\usepackage[final]{graphicx} %draft % To include graphics
\usepackage{booktabs,longtable,rotating} % long tables are split to other lines %for rotating tables
\usepackage{array,warpcol} % Alignment on decimal point entries in tables
\usepackage{multirow} % muli rows (merge) in tables
\usepackage{fixme} %
\usepackage[section,verbose]{placeins} % Keeps floats `in their place', preventing them from floating past a "\FloatBarrier" command into another section
\usepackage[width=11cm,font=footnotesize,labelfont=bf, %
format=default,justification=centerlast]{caption} % Captions
\usepackage{fancyhdr} % Change caption style; changes headers and page styles etc.
\usepackage{sectsty} % Changing section headings
\usepackage{setspace} % For changing line spacing
%\usepackage{gensymb,units}
\usepackage{url} % Formatting for URL's i.e. http://www.rhizobia.co.nz
\usepackage{natbib} % Package for the bibliography
\usepackage{appendix} % Makes appendices
\usepackage{cclicenses} % Creative commons
\usepackage{afterpage} % Makes appendices
\usepackage{microtype} % makes pdf look better
%\usepackage{lineno} % Line numbering [pagewise]
\usepackage[nottoc]{tocbibind} % Table of contents
%\usepackage{texshade} % Fancy DNA sequences

% ---------------------------------------------------------------
% OPTIONS

%\citeindextrue

% Fuzz
\hfuzz2pt % Don't bother to report over-full boxes if over-edge is < 2pt

 

%----------------------------------------------
%Alter page dimensions

%\setlength{\textwidth}{16cm}
%\setlength{\oddsidemargin}{0.46cm}
%\setlength{\evensidemargin}{0.46cm}
%\setlength{\textheight}{22.3cm}
%\setlength{\topmargin}{-0.54cm}
%\setlength{\headsep}{1.5cm}
%\setlength{\footnotesep}{0.6cm}

%-------------------------------------------
\pagestyle{fancy}
% with this we ensure that the chapter and section
% headings are in lowercase.
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
\fancyhf{} % delete current setting for header and footer
\fancyhead[LE,RO]{\bfseries\thepage}
\fancyhead[LO]{\bfseries\rightmark}
\fancyhead[RE]{\bfseries\leftmark}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0pt}
\addtolength{\headheight}{0.5pt} % make space for the rule
\fancypagestyle{plain}{%
\fancyhead{} % get rid of headers on plain pages
\renewcommand{\headrulewidth}{0pt} % and the line
}
%---------------------------------------------------------------------

% Document settings

% Just comment the things you don't want
\setcouter{secnumdepth}{3} %subsubsections are numbered
\setcounter{tocdepth}{3} %subsubsections are added to the TOC

\renewcommand{\tocbibname}{References}

\allsectionsfont{\raggedright} % stops headings being split

% \linenumbers % turns line numbering on (for revision)

%parts to include
%uncomment as necessary
\includeonly{
Title, Abstract, Acknowledgements, Glossary, Introduction, Methods,
Identification, Nitrogen, NodA, Discussion, Appendix}
%\makeindex


% \parskip 7.2pt %sets spacing between paragraphs


\begin{document}

%-------------------- end of preamble ---------------------

%--------------------------------------------------------------------------------------------------
\frontmatter %the following is numbered with roman numerals

\include{Title}

\singlespacing
%\onehalfspacing
\doublespacing % --> better for proof reading

\include{Abstract} % Optional
\include{Acknowledgements}

\singlespacing

\tableofcontents \listoffigures \listoftables

\singlespacing
%\onehalfspacing
\doublespacing % --> better for proof reading

\include{Glossary}

%--------------------------------------------------------------------------------------------------
\mainmatter %start numbering with arabic numerals

\include{Introduction}
\include{Background}
\include{Theory}
\include{Method}
\include{Results}
\include{Discussion}
\include{Conclusion}

%--------------------------------------------------------------------------------------------------
%\backmatter %still arabic numerals, but sections not numbered in TOC

\appendix

\include{Appendix}

\singlespacing

\bibliographystyle{bevbib4} %{plainnat}
\bibliography{my_bib_file}

%\addcontentsline{toc}{chapter}{Index} %leave commented I think
% \printindex

\end{document}

%notes
% \textcelsius\ and \textcelsius.
% you can add thin spaces by using: \;

% The symbols * † ‡ § ¶ # should be used for footnotes
% * \dag \ddag \S \P \sharp \diamond

%By default, LaTeX doesn't like to fill more than 0.7 of a text page
%with tables and graphics, nor does it like too many figures per
%page. This behaviour can be changed by placing lines like the
%following before \begin{document}

%\renewcommand\floatpagefraction{.9}
%\renewcommand\topfraction{.9}
%\renewcommand\bottomfraction{.9}
%\renewcommand\textfraction{.1}
%\setcounter{totalnumber}{50} \setcounter{topnumber}{50}
%\setcounter{bottomnumber}{50}

%%----------------------END-------------------------------------------
